//
//  RandomizeCheckBox.m
//  ImageReplacer
//
//  Created by Tyler Powell on 5/7/12.
//  Copyright (c) 2012 Georgia Institute of Technology. All rights reserved.
//

#import "RandomizeCheckBox.h"

@implementation RandomizeCheckBox
@synthesize writer;
-(IBAction)onStateChange:(id)sender
{
    //writeToFileAtIndex(@"options.txt", [NSString stringWithFormat:@"%d", [self state]], 2);
    [writer replaceOptionAtIndex:2 withOption:[NSString stringWithFormat:@"%d",[self state]]];
}

-(void) awakeFromNib
{
    NSString* checkboxstate = [[writer options] objectAtIndex:2];
    [self setState:[checkboxstate longLongValue]];
}


@end
